package com.jz.netthings.application.providerCreate.controller;


import com.baomidou.mybatisplus.plugins.Page;
import com.jz.netthings.application.providerCreate.bean.ProviderZw;
import com.jz.netthings.application.providerCreate.bean.QueryProviderInfo;
import com.jz.netthings.application.providerCreate.service.ProviderInfoService;
import com.jz.netthings.application.providerCreate.service.ProviderZwService;
import com.jz.netthings.exception.AdscmSystemException;
import com.jz.netthings.security.utils.Token;
import com.jz.netthings.support.SimpleCoreResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zyl
 * @since 2019-03-05
 */
@RestController
@RequestMapping("/adscm/application/providerZw")
public class ProviderZwController {
    @Autowired
    RedisTemplate<Object, Token> tokenRedisTemplate;
    @Autowired
    ProviderZwService  providerZwService;
    @RequestMapping("/selectByProviderNo/{id}")
    public SimpleCoreResponse selectByProviderNo(@PathVariable String id , HttpServletRequest request) throws AdscmSystemException {
          List<ProviderZw> ProviderZws=providerZwService.selectByProviderNo(id);
        return new SimpleCoreResponse("200","查询成功" ,ProviderZws);
    }
}

